package org.hxd.admin.Notices.service;

import org.hxd.admin.Notices.dao.AdminNoticeDao;
import org.hxd.pojo.Notice;
import org.hxd.utils.PageModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminNoticeServiceImpl implements AdminNoticeService {
    @Resource
    AdminNoticeDao adminNoticeDao;

    @Override
    public int findNoticeCount() {
        return adminNoticeDao.findNoticeCount();
    }

    @Override
    public List<Notice> findNoticeAll(PageModel pageModel) {
        return adminNoticeDao.findNoticeAll(pageModel);
    }

    @Override
    public int addNoticeForm(Notice notice) {
        return adminNoticeDao.addNoticeForm(notice);
    }

    @Override
    public int deleteNotice(Integer id) {
        return adminNoticeDao.deleteNotice(id);
    }

    @Override
    public Notice findNoticeOne(Integer id) {
        return adminNoticeDao.findNoticeOne(id);
    }

    @Override
    public int updateNotice(Notice notice) {
        return adminNoticeDao.updateNotice(notice);
    }
}
